package ganga.custodian.sandbox;

import ganga.custodian.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

public class SetParamToSensor extends Activity implements OnItemSelectedListener {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.setparam);
		
		Spinner sensorspeed1 = (Spinner) findViewById(R.id.sensorspeed1);
	    ArrayAdapter adapter = ArrayAdapter.createFromResource(this,
	    		R.array.Speed , android.R.layout.simple_spinner_item); 
	    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
	    sensorspeed1.setAdapter(adapter); 
	    
	    /*Spinner sensorspeed2 = (Spinner) findViewById(R.id.sensorspeed2); 
	    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
	    sensorspeed2.setAdapter(adapter); 
	    
	    Spinner sensorspeed3 = (Spinner) findViewById(R.id.sensorspeed3);
	    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
	    sensorspeed3.setAdapter(adapter); 
	    
	    Spinner sensorspeed4 = (Spinner) findViewById(R.id.sensorspeed4);
	    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
	    sensorspeed4.setAdapter(adapter); */
	    
	    int i=adapter.getViewTypeCount();}
	    
	  

	  public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
          String selected =parent.getItemAtPosition(pos).toString();
 // use handler to access select item
      }

      public void onNothingSelected(AdapterView parent) {
          // Do nothing.
      }
	
}
